package com.mobclick.android;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.util.Log;

class h extends Thread
{
  public void run()
  {
    SharedPreferences localSharedPreferences;
    try
    {
      localSharedPreferences = MobclickAgent.a(this.a);
      if ((this.b == null) || ("".equals(this.b)))
      {
        if (UmengConstants.testMode)
          Log.i("MobclickAgent", "userID is null or empty");
      }
      else
      {
        localSharedPreferences.edit().putString("user_id", this.b).commit();
        if ((this.c != null) && (!("".equals(this.c))))
          localSharedPreferences.edit().putString("id_source", this.c).commit();
      }
    }
    catch (Exception localException)
    {
      if (UmengConstants.testMode)
      {
        localException.printStackTrace();
        Log.i("MobclickAgent", localException.getMessage());
      }
    }
  }
}